Skip to content

Accept GTFS direction IDs in SIRI-SX alerts - #8319

Open
KimEJ wants to merge 1 commit into
opentripplanner:dev-2.xfrom
KimEJ:fix-siri-gtfs-direction-8313
Open

KimEJ wants to merge 1 commit into
opentripplanner:dev-2.xfrom
KimEJ:fix-siri-gtfs-direction-8313

Conversation

@KimEJ

@KimEJ KimEJ commented Dec 5, 2026

Copy link
Copy Markdown

Summary

Some SIRI-SX feeds backed by GTFS send 0 or 1 as a DirectionRef. OTP previously ignored those values, so an alert intended for one direction could also appear in the opposite direction.

This change uses OTP’s existing GTFS direction mapper for numeric references, so alerts match the same direction as the scheduled trips. Named references and the existing fallback for unrecognized values are unchanged; unrecognized values now produce a throttled warning.

Issue

Closes #8313.

Unit tests

Ran SiriAlertsUpdateHandlerTest on JDK 25 in an isolated: 21 passed, 0 failed, 0 skipped. The regression tests cover both numeric values, verify that alerts do not appear in the opposite direction, and exercise route-and-stop matching with both named and numeric references. The full test suite was not run.

Documentation

Updated the SIRI configuration guide to document numeric DirectionRef values. No new configuration options or graph serialization changes.

@KimEJ
KimEJ requested a review from a team as a code owner December 5, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accept GTFS direction_id values as DirectionRef in SIRI-SX

1 participant